package com.tvunetworks.center.device.model.param;

import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang.StringUtils;

/**
 * @program: tvucc-aggregator
 * @description: GetChannelParam
 * @author lebronchen
 * @create: 2020-04-14 13:59
 **/
@Data
@Accessors(chain = true)
public class GetChannelParam {

    private String appkey;
    private String timestamp;
    private String signature;
    private String session;
    private String packId;
    private String deviceType;
    private String deviceVersion;
    private String ugcAccountId;
    private String group;
    private int flag;
    private boolean notCheckAccessApp;

    private String ip;

    /**
     *  formate
     */
    public void  formate(){
        if (StringUtils.isNotBlank(packId)) {
            packId = packId.toLowerCase();
            if (packId.startsWith("0x") && packId.length() > 3) {
                packId = packId.substring(2);
            }
        }
    }
}
